<div id="reportBar" style="display: none;">
	<div class="slipedit-info-bar">
		<div class="slipedit-info-tr">
			<div class="slipedit-info-tr-field">举报原因</div>
			<input type="text" id="reason" class="slipedit-info-tr-input" placeholder="请选择举报原因" autocomplete="off" readonly="readonly" onclick="selectReason()" />
			<img class="slipedit-info-tr-img" src="static/pic/app/right.png" />
		</div>
		<div class="slipedit-info-tr2">
            <div class="slipedit-info-tr-field2">问题描述</div>
        </div>
        <div class="slipedit-info-tr3">
            <textarea id="details" class="slipedit-info-tr-textarea" maxlength="250" placeholder="请详细描述您的问题"></textarea>
        </div>
		<div class="slipedit-info-tr">
			<div class="slipedit-info-tr-field">联系人</div>
			<input type="text" id="person" class="slipedit-info-tr-input" placeholder="（选填）" autocomplete="off" />
			<img class="slipedit-info-tr-img" src="static/pic/app/right.png" />
		</div>
		<div class="slipedit-info-tr">
			<div class="slipedit-info-tr-field">联系电话</div>
			<input type="text" id="phone" class="slipedit-info-tr-input" placeholder="（选填）" autocomplete="off" />
			<img class="slipedit-info-tr-img" src="static/pic/app/right.png" />
		</div>
	</div>
</div>

<script type="text/javascript">
	var reportBar = null;
	var reasonBar = null;

	function loadReportBar() {
		reportBar = getHtml('reportBar');
	    setHtml('reportBar', '');

	    list = [
	        {value:'', text:'违法、涉黄信息'}, 
	        {value:'', text:'冒用侵权问题'}, 
	        {value:'', text:'信息虚假'}, 
	        {value:'', text:'含未成年违禁内容'}, 
	        {value:'', text:'人身攻击'},
	        {value:'', text:'其他'}];
	    reasonBar = getSelectItemList('reason', '', list);
	}

	function selectReason() {
	    openSlipSelectDiv(getValue('reason'), reasonBar);
	}

	function openReportBar(title) {
	    setValue('editid', title);
	    setValue('editflag', 'report');
	    openSlipEditDiv('举报', reportBar);
	}

	function submitReport(association, module0) {
	    if (isEmpty('reason') || isWicked('reason')) {
	        showTip('请选择举报原因');
	        return;
	    }
	    if (isEmpty('details') || isWicked('details')) {
	        showTip('问题描述格式异常');
	        return;
	    }
	    if (!isEmpty('person') && isWicked('person')) {
	        showTip('联系人格式异常');
	        return;
	    }
	    if (!isEmpty('phone') && !isMobile('phone') && !isTelphone('phone')) {
	        showTip('联系电话格式异常');
	        return;
	    }

	    var param = {};
	    param.team = 'platform';
	    param.ctrl = 'customer';
	    param.func = 'submitReport';
	    param.title = getAjaxValue('editid');
	    param.reason = getAjaxValue('reason');
	    param.details = getAjaxValue('details');
	    param.person = getAjaxValue('person');
	    param.phone = getAjaxValue('phone');
	    param.association = encodeURIComponent(association);
	    param.module = encodeURIComponent(module0);

	    sendAjax(param, function(result) {
	        closeSlipEditDiv();
	        layer.open({
	            content: '<div class="confirm-content">您的反馈已收到，谢谢您的支持</div>', 
	            btn: ['<div class="confirm-yes">确定</div>'], 
	            anim: 'scale', 
	            shade: true, 
	            shadeClose: true, 
	            fixed: true, 
	            yes: function(index) {
	                layer.close(index);
	            }, 
	            scrollbar: false}
	        );
	    });
	}
</script>